In computer networks, a host computer system is normally connected to the network by a network adapter. In some designs, the network adapter is a board that plugs into the backplane bus of the host computer system. In other designs, the network adapter is built into the CPU motherboard. The host computer system typically includes a device driver which operates the network adapter.
Computer networks transfer data from one network node to another in the form of packets. For the purposes here, packets may include information for all layers of the ISO/OSI model at and above the data link layer. The network adapter transmits packets from the host computer system onto the network, and delivers packets from the network to the host computer system.
During operation, the host computer system produces two types of host memory buffers that are consumed by the network adapter: (1) transmit buffers containing packets to be transmitted onto the network, and (2) receive buffers to hold packets received from the network. The host computer system notifies the network adapter when either type of host memory buffer is produced. Similarly, the network adapter notifies the host computer system when it finishes consuming either type of buffer.
For example, to transmit a packet onto the network, the host computer system produces a transmit buffer by allocating a host memory buffer from a free pool of memory buffers, and writing the packet to the host memory buffer. The host computer system then notifies the network adapter that the transmit buffer has been produced (the packet is ready for transmission). The network adapter consumes the transmit buffer by transmitting the packet onto the network. The network adapter then notifies the host computer system that the buffer has been consumed (transmission has completed).
To receive a packet from the network, the host computer system first produces a receive buffer by allocating a host memory buffer into which a packet from the network may be received. The host computer system then notifies the network adapter that the receive buffer has been produced. When the network adapter subsequently receives a packet from the network to be stored in host memory, it consumes the receive buffer by writing the packet to it. The network adapter then notifies the host that the receive buffer has been consumed (the packet has been received).
When the host computer system is notified that a host memory buffer has been consumed (either a transmit buffer or a receive buffer), it completes the processing of that host memory buffer. The host computer system completes processing a consumed transmit buffer by returning the transmit buffer to the free pool of host memory buffers. The host computer system completes processing a consumed receive memory buffer by delivering the received packet to the appropriate user process, and then returning the receive buffer to the free pool of host memory buffers.
The host computer system typically notifies the network adapter after each host memory buffer has been produced by writing a register on the network adapter. The network adapter typically notifies the host computer system after each host memory buffer has been consumed by sending an interrupt to the host processor in the host computer system.
To date there has been no meaningful extension of the capabilities of network adapters to accomplish other tasks such as contributing to network security. Conventionally, the network adapter is often the ingress point for many untrusted packets of data, which may proliferate a virus on the associated computer. Unfortunately, such ingress point fails to provide any security features to prevent an attack on the computer.